package com.wc.算法基础课.D第四讲数学知识.数学期望.收集卡牌;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/4/9 17:19
 * @description https://www.acwing.com/problem/content/4012/
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int N = 17, M = 1 << N;
    // f[i][j] 表示有i个硬币数，状态为j的期望
    static double[][] f = new double[N * 5][M];
    static int n, k;
    static double[] a = new double[N];

    public static void main(String[] args) {
        n = sc.nextInt();
        k = sc.nextInt();
        for (int i = 0; i < n; i++) a[i] = sc.nextDouble();
        out.println(dp(0, 0, 0, n));
        out.flush();
    }

    static double dp(int u, int state, int coins, int cnt) {
        if (f[coins][state] > 0) return f[coins][state];
        if (cnt * k <= coins) return f[coins][state] = u;
        double s = 0;
        for (int i = 0; i < n; i++) {
            if ((state >> i & 1) == 1) s += a[i] * dp(u + 1, state, coins + 1, cnt);
            else s += a[i] * dp(u + 1, state | (1 << i), coins, cnt - 1);
        }
        return f[coins][state] = s;
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
